﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Converters="clr-namespace:DanielVaughan.Windows.Converters;assembly=DanielVaughan.Silverlight"
    xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls">

	<Converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
	
	<LinearGradientBrush x:Key="LightBrush" StartPoint="0,0" EndPoint="0,1">
		<GradientBrush.GradientStops>
			<GradientStopCollection>
				<GradientStop Color="#333" Offset="0.0"/>
				<GradientStop Color="#000" Offset="1.0"/>
			</GradientStopCollection>
		</GradientBrush.GradientStops>
	</LinearGradientBrush>

	<SolidColorBrush x:Key="SolidBorderBrush" Color="#444" />
	<SolidColorBrush x:Key="WindowBackgroundBrush" Color="#444" />
	<SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#111" />
	<SolidColorBrush x:Key="DisabledBorderBrush" Color="#555" />
	<SolidColorBrush x:Key="DisabledForegroundBrush" Color="DarkGray" />
	<SolidColorBrush x:Key="EnabledForegroundBrush" Color="LightGray" />
	
	<Style TargetType="Controls:TabControl">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Controls:TabControl">
					<Grid>
						<TextBlock>Blah</TextBlock>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<DataTemplate x:Key="TabHeaderDataTemplate">
		<StackPanel Orientation="Horizontal" VerticalAlignment="Stretch">
			<!--<TextBlock x:Name="textBlock" 
					   Text="{Binding Title}" 
					   HorizontalAlignment="Left" 
					   TextWrapping="NoWrap" Foreground="#FFFFFFFF" Margin="0,2,0,0"  
					   FontFamily="Arial" FontSize="11" />-->
			<!--Visibility="{Binding Path=Content.Dirty, FallbackValue=Collapsed, Converter={StaticResource BooleanToVisibilityConverter}}"-->
			<!--<TextBlock Text="*" 
					   Visibility="{Binding Path=Content.Dirty, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=Collapsed}"
					   HorizontalAlignment="Left" Foreground="#FFFFFFFF" Margin="0,2,0,0" />-->
			<!-- Command="ApplicationCommands.Close" CommandParameter="{Binding diagnostics:PresentationTraceSources.TraceLevel=None, Path=Content, RelativeSource={RelativeSource AncestorType={x:Type TabItem}, Mode=FindAncestor}}"  -->
			<!--ToolTip="Close"-->
			<!--<Button x:Name="button"  
					
					 
					Background="{x:Null}" BorderBrush="{x:Null}" Foreground="{x:Null}" 
					Width="9" Height="9" Opacity="1"
					Margin="8,3,0,0" VerticalAlignment="Stretch" BorderThickness="0"
					HorizontalAlignment="Right" />-->
			<!-- Template="{DynamicResource CloseTabButtonControlTemplate}"-->
		</StackPanel>
	</DataTemplate>

	<DataTemplate x:Key="TabItemTemplate">
		<Grid><TextBlock>Blah</TextBlock></Grid>
	</DataTemplate>
	
	<Style TargetType="Controls:TabItem">
		<Setter Property="Header" Value="Hallo" />
		<Setter Property="HeaderTemplate" Value="{StaticResource TabHeaderDataTemplate}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Controls:TabItem">
					<Grid>
						<!--<Border 
							Name="Border"
							Margin="0,0,-4,0" 
							Background="{StaticResource LightBrush}"
							BorderBrush="{StaticResource SolidBorderBrush}" 
							BorderThickness="1,1,1,1" 
							CornerRadius="2,12,0,0">
							<ContentPresenter x:Name="ContentSite"
							  VerticalAlignment="Center"
							  HorizontalAlignment="Center"											  
							  ContentSource="Header"
							  Margin="12,2,12,2"
							 />-->
							<!--  RecognizesAccessKey="True" -->
						<!--</Border>-->
					</Grid>
					<!--<ControlTemplate.Triggers>
						<Trigger Property="IsSelected" Value="True">
							<Setter Property="Panel.ZIndex" Value="100" />
							<Setter TargetName="Border" Property="Background" Value="{StaticResource WindowBackgroundBrush}" />
							<Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" />
						</Trigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
							<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
							<Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
						</Trigger>
						<Trigger Property="IsEnabled" Value="true">
							<Setter Property="Foreground" Value="{StaticResource EnabledForegroundBrush}" />
						</Trigger>
					</ControlTemplate.Triggers>-->
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>